//
//  OptionUserViewController.m
//  InterventixApp
//
//  Created by Diego Falcinelli on 11/10/13.
//
//

#import "OptionUserViewController.h"
#import "CoreDataManager.h"
#import "Define.h"
#import "SettingUtils.h"

@interface OptionUserViewController ()

@end

@implementation OptionUserViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



-(IBAction) reset{
    [self.coreDataManager dropDatabase];
    
    [SettingUtils set:SAVE_REVISION_USERS obj:@0 user:[self.user.idutente stringValue]];
    [SettingUtils set:SAVE_REVISION_INTERVENTS obj:@0 user:[self.user.idutente stringValue]];
    [SettingUtils set:SAVE_REVISION_CLIENTS obj:@0 user:[self.user.idutente stringValue]];
    [SettingUtils set:BUFFER_INTERVENTS obj:@0 user:[self.user.idutente stringValue]];
    
}

-(IBAction) indietro{
	[[self navigationController] popViewControllerAnimated:YES];
}

@end
